package com.fingard.dsp.bank.directConfig;

import java.util.ArrayList;
import java.util.Iterator;

import com.fingard.xml.XElement;

public class NodeAnalysisSet {
	public String setFor;
	public String charset;
	public ArrayList<NodeAnalysisItem> items;
	
	public void fromXElement(XElement p_xe) throws Exception{
		setFor = p_xe.getAttrValue("for");
		charset = p_xe.getAttrValue("charset");
		items = new ArrayList<NodeAnalysisItem>();
		ArrayList<XElement> listXE = p_xe.getChildList("item");
		if(listXE != null && listXE.size()>0){
			Iterator<XElement> iter = listXE.iterator();
			while (iter.hasNext()) {
				XElement eachXE = iter.next();
				NodeAnalysisItem eachItem = new NodeAnalysisItem();
				eachItem.fromXElement(eachXE);
				items.add(eachItem);
			}
		}
	}
}
